home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / VCM / VCM.MDB / VcmComponentContainer / 14_Cabinet / ERRORDLG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-18  |  2.5 KB  |  98 lines

  1. #if !defined(AFX_ERRORDLG_H__EAC8D343_DDCB_11D0_8470_00A0C905A456__INCLUDED_)
  2. #define AFX_ERRORDLG_H__EAC8D343_DDCB_11D0_8470_00A0C905A456__INCLUDED_
  3.  
  4. #if _MSC_VER >= 1000
  5. #pragma once
  6. #endif // _MSC_VER >= 1000
  7. // ErrorDlg.h : header file
  8. //
  9. // This is a part of the Microsoft Foundation Classes and
  10. // Templates (MFC&T).
  11. // Copyright (C) 1998 Microsoft Corporation
  12. // All rights reserved.
  13. //
  14. // This source code is only intended as a supplement to the
  15. // MFC&T Reference and related electronic documentation provided
  16. // with the library.  See these sources for detailed information
  17. // regarding the MFC&T product.
  18. //
  19.  
  20. /////////////////////////////////////////////////////////////////////////////
  21. // struct MYERRORINFO
  22.  
  23. struct MYERRORINFO
  24. {
  25.     BSTR    bstrSource;
  26.     BSTR    bstrDescription;
  27.     DWORD   dwHelpContext;
  28.     GUID    guid;
  29.     BSTR    bstrHelpFile;
  30. };
  31.  
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CErrorsDialog dialog
  35.  
  36. class CErrorsDialog : public CDialog
  37. {
  38. // Construction
  39. public:
  40.     CErrorsDialog(CWnd* pParent = NULL);   // standard constructor
  41.     ~CErrorsDialog()
  42.     {
  43.         while (!m_listErrorInfo.IsEmpty())
  44.         {
  45.             struct MYERRORINFO* pInfo = (MYERRORINFO*)m_listErrorInfo.RemoveTail();
  46.             SysFreeString(pInfo->bstrSource);
  47.             SysFreeString(pInfo->bstrDescription);
  48.             SysFreeString(pInfo->bstrHelpFile);
  49.             delete pInfo;
  50.             pInfo = NULL;
  51.         }
  52.         m_listErrorInfo.RemoveAll();
  53.     }
  54.     void Init(IUnknown* pUnk, const IID& iid)
  55.     {
  56.         m_spUnk = pUnk;
  57.         m_iid = iid;
  58.     }
  59.  
  60. // Dialog Data
  61.     //{{AFX_DATA(CErrorsDialog)
  62.     enum { IDD = IDD_ERRORS };
  63.     CEdit   m_ctlGUID;
  64.     CListBox    m_ctlListSource;
  65.     CEdit   m_ctlDescription;
  66.     CButton m_ctlHelp;
  67.     //}}AFX_DATA
  68.  
  69.  
  70. // Overrides
  71.     // ClassWizard generated virtual function overrides
  72.     //{{AFX_VIRTUAL(CErrorsDialog)
  73.     protected:
  74.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  75.     //}}AFX_VIRTUAL
  76.  
  77. // Implementation
  78. protected:
  79.     void SelectSource(int nSel);
  80.     CPtrList m_listErrorInfo;
  81.     CComPtr<IUnknown> m_spUnk;
  82.     IID m_iid;
  83.     int m_nSelectedItem;
  84.  
  85.     // Generated message map functions
  86.     //{{AFX_MSG(CErrorsDialog)
  87.     virtual BOOL OnInitDialog();
  88.     afx_msg void OnHelp();
  89.     afx_msg void OnSelChange();
  90.     //}}AFX_MSG
  91.     DECLARE_MESSAGE_MAP()
  92. };
  93.  
  94. //{{AFX_INSERT_LOCATION}}
  95. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  96.  
  97. #endif // !defined(AFX_ERRORDLG_H__EAC8D343_DDCB_11D0_8470_00A0C905A456__INCLUDED_)
  98.